//: Playground - noun: a place where people can play

import Cocoa

extension Array{
    func each (call: (Element) -> ()) {
        
        for item in self {
            call(item)
        }
        
    }
}

var a = [1,2,3,4,5]
a.each({println($0)})

var b = map(a, {
    $0 * 2
})

b
